import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    redirect: '/recommend'
  },
  {
    path: '/recommend',
    name: 'Recommend',
    component: () => import('@/views/Recommend')
  },
  {
    path: '/top',
    name: 'Top',
    component: () => import('@/views/Top')
  },
  {
    path: '/searchindex',
    name: 'SearchIndex',
    component: () => import('@/components/SearchIndex'),
    props: true
  },
  {
    path: '/songitem/:id',
    name: 'SongItem',
    meta: {
      hideHead: true
    },
    component: () => import('@/views/SongItem'),
    props: true
  },
  {
    path: '/fullscreen',
    name: 'FullScreen',
    meta: {
      hideHead: true
    },
    component: () => import('@/components/FullScreen'),
    props: true,
    // redirect:'/fullscreen/songs',
    // children:[

    // ]
  },
  // {
  //   path: '/songs',
  //   name: 'Songs',
  //   component: () => import('@/components/Songs')
  // },
  // {
  //   path: '/lyric',
  //   name: 'Lyric',
  //   component: () => import('@/components/Lyric')
  // }
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
